#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	string x, y, z;
	cin >> n >> x >> y;
	for(int i=0; i<n; ++i) {
		z += 'a'; 
	}
	for (int i = 0; i < n; ++i) {
		if (y[i] > x[i]) {
			cout << -1 << endl;
			return 0;
		}
		if (y[i] == x[i]) {
			z[i] = 'z';
		} else {
			z[i] = y[i];
		}
	}
	cout << z << endl;
	return 0;
}

